feat(bugfix): add /speedrun command for running remaining phases without stopping#71
Conversation
…out stopping Add a speedrun command that auto-advances through the bugfix workflow from the current phase to the end, using artifact detection to determine where to pick up. The command replaces the controller for the duration of the run, dispatching one phase at a time and looping via re-reads. To support this without breaking the existing stop-and-wait behavior: - Update all 8 phase skills to use generic "return to dispatcher" endings instead of hardcoding the controller path, with both controller and speedrun shown as examples - Update the controller announce step to include its path as the dispatcher so skills can find their way back - Speedrun announces itself as dispatcher on each phase entry, creating breadcrumbs in conversation context that skills use to return to the right file Made-with: Cursor
WalkthroughThis PR introduces a new speedrun workflow dispatcher and updates skill files to support dynamic file-based control flow routing. The speedrun dispatcher coordinates sequential phase execution without pauses, while skills now announce their return destination before re-reading for next steps. Two skills gain artifact persistence functionality. Changes
Sequence DiagramsequenceDiagram
actor User
participant Speedrun as Speedrun Dispatcher
participant Skill as Current Skill
participant Artifacts as Artifact Storage
User->>Speedrun: Start speedrun workflow
loop Each Phase
Speedrun->>Speedrun: Check artifact signals
Speedrun->>Speedrun: Determine next phase
alt All phases complete
Speedrun->>User: Return completion report
else Phase remaining
Speedrun->>Skill: Execute phase
Skill->>Skill: Perform phase logic
Skill->>Artifacts: Save results (if applicable)
Skill->>Skill: Announce return file
Skill->>Speedrun: Re-read for next steps
end
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@workflows/bugfix/.claude/commands/speedrun.md`:
- Around line 55-58: Summary: Tighten repetitive "If ..." bullet phrasing for
readability by rewording one bullet. Change the bullet that currently reads "If
conversation context clearly establishes a phase was completed (even without an
artifact), skip it." to a non-repetitive opener such as "When conversation
context clearly establishes a phase was completed (even without an artifact),
skip it." Update the line in workflows/bugfix/.claude/commands/speedrun.md where
that exact bullet text appears so the three bullets no longer all begin with
"If".
- Around line 48-58: Update the speedrun phase gating to use a concrete, durable
review artifact so the review phase runs exactly once per cycle: modify
workflows/bugfix/.claude/commands/speedrun.md to require and check for a
persistent review artifact (e.g., an artifacts/bugfix/review-complete file)
instead of relying solely on context; update the table entry for the "review"
phase that currently references `.claude/skills/review/SKILL.md` to point to the
new artifact, and ensure any code that creates the artifact (the review workflow
or `.claude/skills/review` runner) writes that artifact when review completes so
`speedrun` can deterministically detect completion.
- Line 43: Replace the non-durable conversation-state-based phase selection for
the /assess command with a durable completion artifact: update the /assess
command handler so it writes and reads a named durable artifact (e.g.,
"assess_phase" or "assess_completion") instead of relying on ephemeral
conversation state, and change the SKILL.md references that determine phase
routing to consult that artifact on resume; ensure creation, update, and lookup
of the artifact are performed at the same points where phase transitions happen
so resumability across restarts uses the durable artifact.
In `@workflows/bugfix/.claude/skills/controller/SKILL.md`:
- Around line 41-49: The controller SKILL.md dispatcher needs the same explicit
escalation guardrails as the speedrun command; update
workflows/bugfix/.claude/skills/controller/SKILL.md to include the escalation
checks and prompts copied/adapted from
workflows/bugfix/.claude/commands/speedrun.md (the guardrail block around Line
76-80) so controller-driven execution enforces the same escalation parity;
ensure the dispatcher announcement still appears (the "Starting the /fix
phase..." message) and then run the escalation-check sequence before proceeding
to step 2 (Read the skill file) so the controller and speedrun entrypoints
behave identically.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 7ecfcb7d-778b-4582-b059-118a56fc80d8
📒 Files selected for processing (10)
workflows/bugfix/.claude/commands/speedrun.mdworkflows/bugfix/.claude/skills/assess/SKILL.mdworkflows/bugfix/.claude/skills/controller/SKILL.mdworkflows/bugfix/.claude/skills/diagnose/SKILL.mdworkflows/bugfix/.claude/skills/document/SKILL.mdworkflows/bugfix/.claude/skills/fix/SKILL.mdworkflows/bugfix/.claude/skills/pr/SKILL.mdworkflows/bugfix/.claude/skills/reproduce/SKILL.mdworkflows/bugfix/.claude/skills/review/SKILL.mdworkflows/bugfix/.claude/skills/test/SKILL.md
| | review | `.claude/skills/review/SKILL.md` | Always run once between test and document | | ||
| | document | `.claude/skills/document/SKILL.md` | `artifacts/bugfix/docs/pr-description.md` exists | | ||
| | pr | `.claude/skills/pr/SKILL.md` | A PR URL has been shared in conversation | | ||
|
|
||
| ### Rules | ||
|
|
||
| - Check artifacts in order. The first phase whose signal is NOT satisfied is next. | ||
| - If no artifacts exist and no assessment has been done, start at **assess**. | ||
| - If the user specifies a starting point in `$ARGUMENTS`, respect that. | ||
| - If conversation context clearly establishes a phase was completed (even | ||
| without an artifact), skip it. |
There was a problem hiding this comment.
review phase completion is ambiguous without a durable signal.
The current rule depends on context interpretation, which can drift. Add a concrete review artifact so speedrun can deterministically run review exactly once per cycle.
Proposed update
-| review | `.claude/skills/review/SKILL.md` | Always run once between test and document |
+| review | `.claude/skills/review/SKILL.md` | `artifacts/bugfix/review/verdict.md` exists (for current fix cycle) |-- If conversation context clearly establishes a phase was completed (even
-- without an artifact), skip it.
+- Use conversation context only as a fallback when artifact checks are impossible.🧰 Tools
🪛 LanguageTool
[style] ~57-~57: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ... point in $ARGUMENTS, respect that. - If conversation context clearly establishe...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@workflows/bugfix/.claude/commands/speedrun.md` around lines 48 - 58, Update
the speedrun phase gating to use a concrete, durable review artifact so the
review phase runs exactly once per cycle: modify
workflows/bugfix/.claude/commands/speedrun.md to require and check for a
persistent review artifact (e.g., an artifacts/bugfix/review-complete file)
instead of relying solely on context; update the table entry for the "review"
phase that currently references `.claude/skills/review/SKILL.md` to point to the
new artifact, and ensure any code that creates the artifact (the review workflow
or `.claude/skills/review` runner) writes that artifact when review completes so
`speedrun` can deterministically detect completion.
The assess and review phases previously had no persistent artifacts, relying on conversation state to determine completion. This breaks resumability across session restarts. - Assess skill now writes artifacts/bugfix/reports/assessment.md - Review skill now writes artifacts/bugfix/review/verdict.md - Speedrun command updated to check these artifacts instead of conversation state for phase completion detection Made-with: Cursor
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (2)
workflows/bugfix/.claude/skills/controller/SKILL.md (1)
41-49:⚠️ Potential issue | 🟠 MajorAdd escalation checks to the controller execution path for dispatcher parity.
The updated dispatch wording is good, but controller-driven runs still don’t apply the same escalation gate that speedrun applies (see
workflows/bugfix/.claude/commands/speedrun.md, Line 76-Line 80). Please add the escalation check before proceeding to skill execution so behavior is consistent across entrypoints.Proposed doc fix
## How to Execute a Phase 1. **Announce** the phase to the user before doing anything else. Include this file as the dispatcher so skills know where to return, e.g., "Starting the /fix phase (dispatched by `.claude/skills/controller/SKILL.md`)." This is very important so the user knows the workflow is working, learns about the commands, and so skills can find their way back here. +2. **Apply escalation checks** before proceeding. If confidence is below 80%, + root cause is unclear, multiple valid solutions have unclear trade-offs, + a security/compliance concern appears, or an architectural decision is needed, + stop and ask the user. -2. **Read** the skill file from the list above -3. **Execute** the skill's steps directly — the user should see your progress +3. **Read** the skill file from the list above +4. **Execute** the skill's steps directly — the user should see your progress🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@workflows/bugfix/.claude/skills/controller/SKILL.md` around lines 41 - 49, Add the same escalation gate used by the speedrun entrypoint to the controller-driven dispatch flow in SKILL.md so controller runs check escalation before executing skills; specifically, copy the escalation-check logic from the speedrun command (the gate implemented around the dispatch step in workflows/bugfix/.claude/commands/speedrun.md) and invoke it in the controller dispatch sequence (the step that currently "Announce" -> "Read" -> "Execute") immediately after the announcement and before reading/executing any skill, aborting or escalating per the same conditions and messages as speedrun.workflows/bugfix/.claude/commands/speedrun.md (1)
57-58:⚠️ Potential issue | 🟠 MajorAvoid conversation-only completion fallback for phase skipping.
Line 57-Line 58 reintroduces non-durable routing and can skip the wrong phase after long sessions/resumes. Keep artifact checks authoritative, and only use conversation as last-resort when artifact lookup is impossible.
Proposed doc fix
-- If conversation context clearly establishes a phase was completed (even - without an artifact), skip it. +- Use conversation context only when artifact checks are impossible + (for example, artifact read failure), and report that fallback explicitly.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@workflows/bugfix/.claude/commands/speedrun.md` around lines 57 - 58, Replace the current sentence that permits skipping a phase based solely on conversation context with a rule that artifact checks are authoritative: update the wording around "If conversation context clearly establishes a phase was completed (even without an artifact), skip it." so it instead states that phases must only be skipped when a corresponding artifact is present, and conversation-only evidence may be used only as a last-resort fallback when artifact lookup is impossible; ensure the doc references "artifact checks" as primary and "conversation fallback" as secondary to prevent non-durable routing and incorrect phase skipping after long sessions/resumes.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@workflows/bugfix/.claude/commands/speedrun.md`:
- Line 50: Update the `pr` phase completion check to rely on a durable artifact
instead of conversational state: change the completion condition for the "pr"
phase to verify the presence of an artifact (e.g., a PR URL file) and modify the
PR skill (`.claude/skills/pr/SKILL.md`) to write the created/shared PR URL into
that artifact (suggested name: artifacts/bugfix/pr/url.md) when it outputs the
URL; ensure the phase runner reads that artifact to mark completion so
retries/resumes detect the PR URL deterministically.
---
Duplicate comments:
In `@workflows/bugfix/.claude/commands/speedrun.md`:
- Around line 57-58: Replace the current sentence that permits skipping a phase
based solely on conversation context with a rule that artifact checks are
authoritative: update the wording around "If conversation context clearly
establishes a phase was completed (even without an artifact), skip it." so it
instead states that phases must only be skipped when a corresponding artifact is
present, and conversation-only evidence may be used only as a last-resort
fallback when artifact lookup is impossible; ensure the doc references "artifact
checks" as primary and "conversation fallback" as secondary to prevent
non-durable routing and incorrect phase skipping after long sessions/resumes.
In `@workflows/bugfix/.claude/skills/controller/SKILL.md`:
- Around line 41-49: Add the same escalation gate used by the speedrun
entrypoint to the controller-driven dispatch flow in SKILL.md so controller runs
check escalation before executing skills; specifically, copy the
escalation-check logic from the speedrun command (the gate implemented around
the dispatch step in workflows/bugfix/.claude/commands/speedrun.md) and invoke
it in the controller dispatch sequence (the step that currently "Announce" ->
"Read" -> "Execute") immediately after the announcement and before
reading/executing any skill, aborting or escalating per the same conditions and
messages as speedrun.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: f05d29c8-3046-4645-a567-643e91267260
📒 Files selected for processing (10)
workflows/bugfix/.claude/commands/speedrun.mdworkflows/bugfix/.claude/skills/assess/SKILL.mdworkflows/bugfix/.claude/skills/controller/SKILL.mdworkflows/bugfix/.claude/skills/diagnose/SKILL.mdworkflows/bugfix/.claude/skills/document/SKILL.mdworkflows/bugfix/.claude/skills/fix/SKILL.mdworkflows/bugfix/.claude/skills/pr/SKILL.mdworkflows/bugfix/.claude/skills/reproduce/SKILL.mdworkflows/bugfix/.claude/skills/review/SKILL.mdworkflows/bugfix/.claude/skills/test/SKILL.md
Summary
/speedruncommand to the bugfix workflow that auto-advances through remaining phases without stopping between them, using artifact detection to determine where to pick upCloses #53
Design
The speedrun command works as a re-readable loop: each time it's read, it checks artifacts to find the next incomplete phase, dispatches it, and the skill returns here when done. Three mechanisms prevent context drift:
Normal stop-and-wait behavior is fully preserved when using individual phase commands.
Test plan
/assessthen/reproduce) — verify stop-and-wait behavior still works and skills return to the controller/speedrunfrom scratch with a bug report — verify it runs all phases sequentially/speedrun— verify it detects completed phases via artifacts and picks up from the next oneMade with Cursor